
package ch.hearc.coursJava.kitBase.tableau.intro;

public class UseTab1D
	{

	/*------------------------------------------------------------------*\
	|*							Methodes Public							*|
	\*------------------------------------------------------------------*/

	public static void main(String[] args)
		{
		main();
		}

	public static void main()
		{
		useTableau();
		}

	/*------------------------------------------------------------------*\
	|*							Methodes Private						*|
	\*------------------------------------------------------------------*/

	/**
	 * <pre>
	 * <i>Exemple</i>
	 * d'utilisation 1d
	 * </pre>
	 */
	private static void useTableau()
		{
		int n = 3;
		double[] tab = new double[n];
		tab[0] = Math.PI;
		tab[1] = Math.E;
		tab[2] = 27;

		afficherIndice(tab);//TODO: Example d'annotation d'un code . Use view task to see all annotation
		afficherForEach(tab);
		}

	private static void afficherIndice(double[] tab)
		{
		for(int i = 1; i <= tab.length; i++)
			{
			System.out.println(tab[i - 1]);
			}
		}

	private static void afficherForEach(double[] tab)
		{
		for(double elem:tab)
			{
			System.out.println(elem);
			}
		}
	}
